package com.edu.lawdoc.dao;

public class Field {
    public enum Action {
        EQUALS("="),
        IN("in"),
        LIKE("like"),
        GREATER_THAN_OR_EQUAL_TO(">="),
        LESS_THAN("<");

        private final String value;

        Action(String value) {
            this.value = value;
        }

        public String value() {
            return this.value;
        }
    }

    private String key; // 字段
    private Object value; // 值
    private Integer order = 0; //使用了索引的话会利用这个值做排序，把索引字段排在前面
    private Action action;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }

    public Integer getOrder() {
        return order;
    }

    public void setOrder(Integer order) {
        this.order = order;
    }

    public String getAction() {
        return action.value();
    }

    public void setAction(Action action) {
        this.action = action;
    }


    public static void main(String[] args) {
        //System.out.println(Action.LIKE.value());
    }
}
